/*FE team init js library*/
/*font resize*/
(function(win) {
    var doc = win.document;
    var docEl = doc.documentElement;
    var tid;

    function refreshRem() {
        var width = docEl.getBoundingClientRect().width;
        if (width > 860) {
            width = 600;
        }
        var rem = width / 5.55;
        docEl.style.fontSize = rem + "px";
    }

    function hideFlash() {
        if (document.getElementById("st_rPrefecth")) {
            document.getElementById("st_rPrefecth").style.display = "none";
        }
        var ele = document.getElementById("st_r_message");
        if (ele) {
            ele.style.display = "";
        }
    }

    setTimeout(function() {
        hideFlash();
    }, 2000);
    win.addEventListener(
        "resize",
        function() {
            clearTimeout(tid);
            tid = setTimeout(refreshRem, 300);
        },
        false
    );
    win.addEventListener(
        "pageshow",
        function(e) {
            hideFlash();
            if (e.persisted) {
                clearTimeout(tid);
                tid = setTimeout(refreshRem, 300);
            }
        },
        false
    );

    refreshRem();

    setTimeout(function () {

            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?538635571a103db5e3722e2a0c63fd7e";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);

    },2000);
})(window);

export default {};
